﻿using DapperExtensions.Mapper;
using System.Text;
using System.Linq;
using System.Collections.Generic;
using System;
using System.Reflection;

namespace DapperExtentionCore.Test.DapperMapper
{
    //public class CustomPluralizedMapper<T> : AutoClassMapper<T> where T : class
    //{
    //    public CustomPluralizedMapper():base()
    //    {
    //        Type type = typeof(T);
    //        var vTable = type.GetCustomAttributes(typeof(TableAttribute), true).ToArray();

    //        var TableName = vTable.Length == 0 ? type.Name : (vTable[0] as TableAttribute).Name;
    //        //Type type = typeof(T);
    //        //Table(type.Name);
    //        //AutoMap();
    //        Table(TableName);// Table(type.Name);
    //        if (vTable.Length > 0 && !string.IsNullOrWhiteSpace((vTable[0] as TableAttribute).Schema))
    //            Schema((vTable[0] as TableAttribute).Schema);
            
    //        AutoMap();
    //    }
    //}
}
